<!DOCTYPE html>
<html>
{include file="public/head" /}
<body class="zanpian-body">
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="callout callout-title">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                <h4>{$nav.title}</h4>
                {notempty name="nav.remark"}
                <p>{$nav.remark}</p>
                {/notempty}
</div>
<div class="panel-body">
<div class="panel-tool">
<div class="row">
              <div class="col-xs-12 m10">
                <div id="toolbar" class="toolbar">
                <a href="{:url('index')}" class="btn btn-primary ajax-url refurbish"><i class="fa fa-refresh"></i> </a> <button type="button" id="plupload-addon" class="btn btn-danger plupload" data-url="{:url('local')}" data-mimetype="application/zip" data-multiple="false" initialized="true" style="position: relative; z-index: 1;"><i class="fa fa-upload"></i> 本地安装</button> <a href="{:url('refresh')}" class="btn btn-primary btn-success ajax-url"><i class="fa fa-refresh"></i> 刷新插件缓存 </a> <a href="{:url('index')}" class="btn btn-primary ajax-url"><i class="fa fa-cloud-download"></i> 官方在线插件 </a> <a href="{:url('downloaded')}" class="btn btn-primary ajax-url"><i class="fa fa-television"></i> 已安装插件 </a>
                </div>
                <!-- /.toolbar -->
              </div>

            </div>
</div>
<!-- /.panel-tool -->
    <div id="contents">
    <div class="tab-content">
    <div class="row" style="margin-top:10px;">
    {volist name="list" id="vo"}
    <div class="col-sm-4 col-md-3 col-xs-6" style="font-size:13px;">
        <div class="thumbnail addon">
            <a href="{notempty name="vo['demourl']"}{$vo['demourl']}{else/}javascript:;{/notempty}" target="_blank"><img src="{notempty name="$vo['image']"}{$vo['image']}{else/}{$Think.TPL_PATH}tpl/zanpianadmin/img/noaddon.gif{/notempty}" class="img-responsive" alt="{$vo['title']}" /></a>
            <div class="caption">
                <h4>{$vo['title']}  {notempty name="vo.flag"} {$flag[$vo['flag']]}{/notempty}</h4>
                <!--<p class="text-danger"><b>{$vo['title']}</b></p>-->
                <p class="text-muted">作者: {$vo['author']}</p>
                <p class="text-muted text-overflow">描述: {$vo['intro']}</p>
                <p class="text-muted">版本:{notempty name="addon[$vo['name']]"}{if condition="$vo['version'] neq $addon[$vo['name']]['version']"}
                 <span class="label label-danger">{$addon[$vo['name']]['version']}</span> -&gt; <span class="label label-success">{$vo['version']}</span>{else /}{$vo['version']}{/if}{else/}{$vo['version']}{/notempty}</p>
                {notempty name="vo['uptime']"}
                <p class="text-muted">更新时间: {$vo['uptime'|date='Y-m-d H:i:s',###]}</p>
                {/notempty}
                <p class="operate" data-name="{$vo['name']}">
                {notempty name="addon[$vo['name']]"}
                {notempty name="addon[$vo['name']]['config']"}
                <a href="{:url('config',array('name'=>$vo['name']))}"  data-name="修改{$vo['title']}配置文件" class="btn btn-primary btn-editone btn-sm"><i class="fa fa-pencil"></i> 配置</a>
                {/notempty}
                {eq name="addon[$vo['name']]['state']" value="1"}
                <a href="{:url('state')}" class="btn btn-warning btn-enable btn-sm"  data-action="disable"><i class="fa fa-times"></i> 禁用</a>
                {else/}
                <a href="{:url('state')}" class="btn btn-success btn-enable btn-sm"  data-action="enable"><i class="fa fa-check"></i> 启用</a>
                <a href="{:url('uninstall')}" class="btn btn-danger btn-uninstall btn-sm"><i class="fa fa-times"></i> 卸载</a>
                {/eq}
                {else/}
                <a href="{:url('install')}" class="btn btn-primary btn-success btn-install btn-sm"><i class="fa fa-cloud-download"></i> 安装</a> 
                {/notempty}
                </p>
            </div>
        </div>
    </div>
   {/volist}
   </div>
            </div>
{gt name="page['pagecount']" value="1"}
           <div class="panel-page">
              <div class="pull-left panel-page-info hidden-xs"><span class="pagination-info">共{$page['recordcount']}个插件 {$page['pageindex']}/{$page['pagecount']} </span><span class="page-list">每页显示 {$page['pagesize']} 条数据</span></div>
              <div class="panel-page-url ajax-page">
               <ul class="pagination"> {$page.pagelist} <div class="panel-page-select pull-left"><select class="select2 ajax-select" data-url="{:url_page(request()->action(),request()->param(),1)}"> <option value="8" {eq name="limit" value="8"}selected{/eq}>08 条/页</option><option value="16" {eq name="limit" value="16"}selected{/eq}>16 条/页</option><option value="24" {eq name="limit" value="24"}selected{/eq}>24 条/页</option><option value="32" {eq name="limit" value="32"}selected{/eq}>32 条/页</option><option value="40" {eq name="limit" value="40"}selected{/eq}>40 条/页</option><option value="48" {eq name="limit" value="48"}selected{/eq}>48 条/页</option></select></div><div class="panel-page-jump"><input type="input" name="page" id="page" min="1" value="{$page['pageindex']}" class="form-control"/><input type="button" value="跳 转" data-url="{:url_page(request()->action(),request()->param())}" class="btn btn-default ajax-jump" /></div></ul>
                
              </div>
            </div>
           <!-- /.panel-page --> 
{/gt}

    </div>
         </div>
         <!-- /.panel-body --> 
        </div>
        </div>
        </section>
{include file="public/footer" /}
{literal}
<script id="conflicttpl" type="text/html">
    <div class="alert alert-dismissable alert-danger">
        <button type="button" class="close" data-dismiss="alert">×</button>
        <strong>警告!</strong> 此插件中发现和现有系统中部分文件发现冲突！以下文件将会被影响，请备份好相关文件后再继续操作
    </div>
    <table class="table table-striped">
        <thead>
            <tr>
                <th>编号</th>
                <th>文件</th>
            </tr>
        </thead>
        <tbody>
            <%for(var i=0;i < conflictlist.length;i++){%>
            <tr>
                <th scope="row"><%=i+1%></th>
                <td><%=conflictlist[i]%></td>
            </tr>
            <%}%>
        </tbody>
    </table>
</script>
{/literal}
<script type="text/javascript">
$(document).ready(function(){
         zanpian.cms.addon();
});	
</script>
</body>
</html>
